<template>
  <div class="container">
    <div class="image-section">
      <img src="" alt="背景" />
    </div>
    <div class="form-section">
      <div class="form-container">
        <h2>yotpo.</h2>
        <el-form :model="form" ref="form" label-width="120px">
          <el-form-item label="用户名">
            <el-input
              v-model="form.username"
              placeholder="请输入账号"
            ></el-input>
          </el-form-item>
          <el-form-item label="密码">
            <el-input
              v-model="form.password"
              type="password"
              placeholder="请输入密码"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="register">注册</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>  
    
    <script>
export default {
  data() {
    return {
      form: {
        username: "",
        password: "",
      },
    };
  },
  methods: {
    register() {
      // 表单提交逻辑
      console.log("注册:", this.form);
    },
  },
};
</script>  
    
    <style scoped>
.container {
  display: flex;
  height: 100vh;
}

.image-section {
  flex: 1;
  background-size: cover;
  background-position: center;
}

.image-section img {
  width: 100%;
  height: auto;
}

.form-section {
  flex: 0 0 400px; /* 或者调整宽度 */
  background-color: white;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-container {
  max-width: 300px;
  margin: auto;
}
</style>